'''
Created on Oct 23, 2009

@author: aamn
'''
'''
generic datamodel for spectra

describe the array columns in the input array, assuming that any
input array can be described by NxM spectra, where N is the number
of spectra. (0)
@author: aamn
'''
# set data model values
# Spectra.model=model
# this includes the definition of the first pixel (cpx)
# which hdu to use, which index is the flux spectrum,
# what are bad values of flux and what are bad spectral windows due,
# for example to uncorrected sky absorption.
# others to consider:
# - WAT01 considerations
# - positional/fiber information
# - remapping BANDIDs

cpx = 1
hdu = 0

class SpecArr(dict):
	hdu = 0


	'cpx':1,
	'wav':None,
	'flx':None,
	'err':None,
	'msk':None,
	'sky':None,
			'nor':None,
			'raw':None,
			'air':'air',
			'sqz':False,
			'dis':'linear',
			'badvalues':[],
			'badlambda':[[]],
			'sax':['NAXIS1', 'CRVAL1', 'CRPIX1'],
			'skeys':[],
			'okeys':['OBJECT']
			}

adm = {
			'hdu':0,
			'cpx':1,
			'wav':None,
			'flx':None,
			'err':None,
			'msk':None,
			'sky':None,
			'nor':None,
			'raw':None,
			'air':'air',
			'sqz':True,
			'dis':'linear', }


hdu = 0
adm['cpx'] = 1.
adm['flx'] = 0
adm['raw'] = 1
adm['sky'] = 2
adm['air'] = 'air'
adm['dis'] = 'linear'
adm['sqz'] = True

#
units['flux'] = "DN"
units['wave'] = "angstroms"

# these are known bad values in the flux
badvalues = []

# these are bad wavelength ranges *as lists of lists* in Angstroms.
badlambda = [[6870., 6955.], [7680., 7730.]]
badenergy = [[]]
badnumber = [[]]

# these are the fits keys for building the vector axis
# they are fairly standard
sax = ['NAXIS1', 'CRVAL1', 'CRPIX1']

# are there fits keys that describe each spectrum in file?
skeys = ['BANDID1', 'BANDID2', 'BANDID3']

# what keys contain object information?
okeys = ['OBJECT', 'CATOBJ']
